export const isFunction = func => typeof func === "function";
export const isArray = arr => Array.isArray(arr);
export const isNumber = num => {
  if (!Number.isFinite(num) || Number.isNaN(num)) return false;
  return Object.prototype.toString.call(num).indexOf("Number") >= 0;
};
export const isObject = obj => {
  if (isFunction(obj) || isArray(obj)) return false;

  return Object.prototype.toString.call(obj).indexOf("Object") >= 0;
};
export const isAsyncFunction = func =>
  Object.prototype.toString.call(func).indexOf("AsyncFunction") >= 0;
